package com.study.ssm.web;

import com.study.ssm.web.entity.User;
import com.study.ssm.web.service.UserService;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zhoujunlin
 * @date 2023年07月20日 19:19
 * @desc
 */
public class TestApplicationContext01 {

    @Test
    public void test01() {
        // 多配置文件合并
//        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/web/applicationContext.xml");
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("/web/applicationContext*.xml");

        UserService userService = ctx.getBean("userService", UserService.class);
        userService.save(new User("iiiiii", "lllll"));
    }


}
